<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class District extends Model
{
    protected $table = 'district';

    protected $guarded = ['id'];

    public $timestamps = false;

    public function children()
    {
        return $this->hasMany('App\Models\District','parentid','id');
    }

    public function parent()
    {
        return $this->belongsTo('App\Models\District','parentid','id');
    }
}
